.class final Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;
.super Lcom/burstly/lib/component/networkcomponent/burstly/AbstractBurstlyAdaptor;
.source "BurstlyTextAdaptor.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;
    }
.end annotation


# static fields
.field private static final APPSTORE_TYPE:Ljava/lang/String; = "http://img.appads.com/icons/dest_appstore.png"

.field private static final AUDIO_TYPE:Ljava/lang/String; = "http://img.appads.com/icons/dest_audio.png"

.field private static final CALL_TYPE:Ljava/lang/String; = "http://img.appads.com/icons/dest_call.png"

.field private static final CUSTOM_TYPE:Ljava/lang/String; = "http://img.appads.com/icons/dest_custom.png"

.field private static final INAPP_TYPE:Ljava/lang/String; = "http://img.appads.com/icons/dest_inapp.png"

.field private static final ITUNES_TYPE:Ljava/lang/String; = "http://img.appads.com/icons/dest_itunes.png"

.field private static final NETWORK_NAME:Ljava/lang/String; = "burstlyText"

#the value of this static final field might be set in the static constructor
.field private static final PARSED_COLOR:I = 0x0

.field private static final RSS_TYPE:Ljava/lang/String; = "http://img.appads.com/icons/dest_rss.png"

.field private static final SECURE_RANDOM:Ljava/security/SecureRandom; = null

.field private static final TWITTER_TYPE:Ljava/lang/String; = "http://img.appads.com/icons/dest_twitter.png"

.field private static final VIDEO_TYPE:Ljava/lang/String; = "http://img.appads.com/icons/dest_video.png"

.field private static final WEB_TYPE:Ljava/lang/String; = "http://img.appads.com/icons/dest_website.png"


# instance fields
.field mAdText:Ljava/lang/String;

.field private volatile mComponentsToLoad:I

.field private mImageLeft:Landroid/widget/ImageView;

.field private mImageRight:Landroid/widget/ImageView;

.field private mLayout:Landroid/widget/LinearLayout;

.field volatile mLoadedComponentsCount:I

.field private mText:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;

.field private mTileTask:Lcom/burstly/lib/network/request/ImageFetchTask;

.field private mTypeTask:Lcom/burstly/lib/network/request/ImageFetchTask;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 52
    new-instance v0, Ljava/security/SecureRandom;

    invoke-direct {v0}, Ljava/security/SecureRandom;-><init>()V

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->SECURE_RANDOM:Ljava/security/SecureRandom;

    .line 62
    const-string v0, "#cccccc"

    invoke-static {v0}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v0

    sput v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->PARSED_COLOR:I

    return-void
.end method

.method constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
    .locals 2
    .parameter "context"
    .parameter "viewId"

    .prologue
    .line 217
    invoke-direct {p0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/AbstractBurstlyAdaptor;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    .line 218
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " BurstlyTextAdaptor"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTag:Ljava/lang/String;

    .line 219
    invoke-static {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/ImageCache;->initCache(Landroid/content/Context;)V

    .line 220
    invoke-static {p1}, Lcom/burstly/lib/service/SdCardWatchingService;->startWatching(Landroid/content/Context;)V

    .line 221
    return-void
.end method

.method static synthetic access$000(Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTag:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$100()Lcom/burstly/lib/util/LoggerExt;
    .locals 1

    .prologue
    .line 47
    sget-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->LOG:Lcom/burstly/lib/util/LoggerExt;

    return-object v0
.end method

.method static synthetic access$200(Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 47
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTag:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$300()Lcom/burstly/lib/util/LoggerExt;
    .locals 1

    .prologue
    .line 47
    sget-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->LOG:Lcom/burstly/lib/util/LoggerExt;

    return-object v0
.end method

.method private createLayout(Landroid/content/Context;)V
    .locals 6
    .parameter "context"

    .prologue
    const/4 v5, 0x1

    .line 280
    new-instance v1, Landroid/widget/LinearLayout;

    invoke-direct {v1, p1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    .line 281
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v5}, Landroid/widget/LinearLayout;->setClickable(Z)V

    .line 282
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    const/16 v2, 0x11

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setGravity(I)V

    .line 283
    new-instance v0, Landroid/graphics/drawable/GradientDrawable;

    sget-object v1, Landroid/graphics/drawable/GradientDrawable$Orientation;->TOP_BOTTOM:Landroid/graphics/drawable/GradientDrawable$Orientation;

    const/4 v2, 0x2

    new-array v2, v2, [I

    const/4 v3, 0x0

    sget v4, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->PARSED_COLOR:I

    aput v4, v2, v3

    const/high16 v3, -0x100

    aput v3, v2, v5

    invoke-direct {v0, v1, v2}, Landroid/graphics/drawable/GradientDrawable;-><init>(Landroid/graphics/drawable/GradientDrawable$Orientation;[I)V

    .line 286
    .local v0, mDrawable:Landroid/graphics/drawable/GradientDrawable;
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    invoke-static {v1, v0}, Lcom/burstly/lib/util/Utils;->setBackgroundDrawable(Landroid/view/View;Landroid/graphics/drawable/Drawable;)V

    .line 287
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v5}, Landroid/widget/LinearLayout;->setFocusable(Z)V

    .line 288
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getResponseData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v1

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->setAdType(Lcom/burstly/lib/network/beans/ResponseBean$ResponseData$AdType;)V

    .line 289
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getLayoutParamsResolver()Lcom/burstly/lib/component/LayoutParametersResolver;

    move-result-object v2

    invoke-virtual {v2}, Lcom/burstly/lib/component/LayoutParametersResolver;->resolveParameters()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 290
    return-void
.end method

.method private createLeftImage(Landroid/content/Context;)V
    .locals 4
    .parameter "context"

    .prologue
    const/4 v3, 0x5

    .line 246
    new-instance v1, Landroid/widget/ImageView;

    invoke-direct {v1, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mImageLeft:Landroid/widget/ImageView;

    .line 247
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mImageLeft:Landroid/widget/ImageView;

    sget-object v2, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->SECURE_RANDOM:Ljava/security/SecureRandom;

    invoke-virtual {v2}, Ljava/security/SecureRandom;->nextInt()I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setId(I)V

    .line 248
    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v1, -0x2

    invoke-static {}, Lcom/burstly/lib/util/Utils;->getFillparentValue()I

    move-result v2

    invoke-direct {v0, v1, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 250
    .local v0, lp:Landroid/widget/LinearLayout$LayoutParams;
    iput v3, v0, Landroid/widget/LinearLayout$LayoutParams;->leftMargin:I

    .line 251
    iput v3, v0, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    .line 252
    iput v3, v0, Landroid/widget/LinearLayout$LayoutParams;->bottomMargin:I

    .line 253
    const/4 v1, 0x3

    iput v1, v0, Landroid/widget/LinearLayout$LayoutParams;->gravity:I

    .line 254
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mImageLeft:Landroid/widget/ImageView;

    invoke-virtual {v1, v2, v0}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 255
    return-void
.end method

.method private createRightImage(Landroid/content/Context;)V
    .locals 4
    .parameter "context"

    .prologue
    const/4 v3, 0x5

    .line 229
    new-instance v1, Landroid/widget/ImageView;

    invoke-direct {v1, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mImageRight:Landroid/widget/ImageView;

    .line 230
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mImageRight:Landroid/widget/ImageView;

    sget-object v2, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->SECURE_RANDOM:Ljava/security/SecureRandom;

    invoke-virtual {v2}, Ljava/security/SecureRandom;->nextInt()I

    move-result v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setId(I)V

    .line 231
    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v1, -0x2

    invoke-static {}, Lcom/burstly/lib/util/Utils;->getFillparentValue()I

    move-result v2

    invoke-direct {v0, v1, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 233
    .local v0, lp:Landroid/widget/LinearLayout$LayoutParams;
    iput v3, v0, Landroid/widget/LinearLayout$LayoutParams;->rightMargin:I

    .line 234
    iput v3, v0, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    .line 235
    iput v3, v0, Landroid/widget/LinearLayout$LayoutParams;->bottomMargin:I

    .line 236
    iput v3, v0, Landroid/widget/LinearLayout$LayoutParams;->gravity:I

    .line 237
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mImageRight:Landroid/widget/ImageView;

    invoke-virtual {v1, v2, v0}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 238
    return-void
.end method

.method private createTextField(Landroid/content/Context;)V
    .locals 5
    .parameter "context"

    .prologue
    const/4 v4, 0x5

    .line 263
    new-instance v2, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;

    invoke-direct {v2, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mText:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;

    .line 264
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mText:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;

    sget-object v3, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->SECURE_RANDOM:Ljava/security/SecureRandom;

    invoke-virtual {v3}, Ljava/security/SecureRandom;->nextInt()I

    move-result v3

    invoke-virtual {v2, v3}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->setId(I)V

    .line 265
    invoke-static {}, Lcom/burstly/lib/util/Utils;->getFillparentValue()I

    move-result v0

    .line 266
    .local v0, fillparentVal:I
    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    const/high16 v2, 0x3f80

    invoke-direct {v1, v0, v0, v2}, Landroid/widget/LinearLayout$LayoutParams;-><init>(IIF)V

    .line 267
    .local v1, lp:Landroid/widget/LinearLayout$LayoutParams;
    iput v4, v1, Landroid/widget/LinearLayout$LayoutParams;->leftMargin:I

    .line 268
    iput v4, v1, Landroid/widget/LinearLayout$LayoutParams;->rightMargin:I

    .line 269
    iput v4, v1, Landroid/widget/LinearLayout$LayoutParams;->topMargin:I

    .line 270
    const/16 v2, 0x11

    iput v2, v1, Landroid/widget/LinearLayout$LayoutParams;->gravity:I

    .line 271
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mText:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;

    invoke-virtual {v2, v3, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 272
    return-void
.end method

.method private getTileIcon(Ljava/lang/String;)V
    .locals 5
    .parameter "imageUrl"

    .prologue
    const/4 v4, 0x0

    .line 343
    if-eqz p1, :cond_0

    .line 344
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mComponentsToLoad:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mComponentsToLoad:I

    .line 345
    sget-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->LOG:Lcom/burstly/lib/util/LoggerExt;

    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTag:Ljava/lang/String;

    const-string v2, "Server passed a burstly tile image..."

    new-array v3, v4, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 346
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->createLeftImage(Landroid/content/Context;)V

    .line 347
    new-instance v0, Lcom/burstly/lib/network/request/ImageFetchTask;

    new-instance v1, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mImageLeft:Landroid/widget/ImageView;

    invoke-direct {v1, p0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;Landroid/widget/ImageView;)V

    invoke-direct {v0, p1, v1}, Lcom/burstly/lib/network/request/ImageFetchTask;-><init>(Ljava/lang/String;Lcom/burstly/lib/network/request/IRequestCallback;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTileTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    .line 348
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTileTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    invoke-static {}, Lcom/burstly/lib/component/networkcomponent/burstly/ImageCache;->getInstance()Lcom/burstly/lib/component/networkcomponent/burstly/ImageCache;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/burstly/lib/network/request/ImageFetchTask;->setCache(Lcom/burstly/lib/persistance/IResourse;)V

    .line 349
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTileTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Lcom/burstly/lib/util/Utils;->getScale(Landroid/content/Context;)F

    move-result v1

    invoke-virtual {v0, v1}, Lcom/burstly/lib/network/request/ImageFetchTask;->setScale(F)V

    .line 350
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTileTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    new-array v1, v4, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/burstly/lib/network/request/ImageFetchTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 352
    :cond_0
    return-void
.end method

.method private getTypeIcon(Ljava/lang/String;)V
    .locals 5
    .parameter "imageUrl"

    .prologue
    const/4 v4, 0x0

    .line 326
    if-eqz p1, :cond_0

    .line 327
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mComponentsToLoad:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mComponentsToLoad:I

    .line 328
    sget-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->LOG:Lcom/burstly/lib/util/LoggerExt;

    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTag:Ljava/lang/String;

    const-string v2, "Server passed a burstly type image..."

    new-array v3, v4, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 329
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->createRightImage(Landroid/content/Context;)V

    .line 330
    new-instance v0, Lcom/burstly/lib/network/request/ImageFetchTask;

    new-instance v1, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mImageRight:Landroid/widget/ImageView;

    invoke-direct {v1, p0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$ImageCallback;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;Landroid/widget/ImageView;)V

    invoke-direct {v0, p1, v1}, Lcom/burstly/lib/network/request/ImageFetchTask;-><init>(Ljava/lang/String;Lcom/burstly/lib/network/request/IRequestCallback;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTypeTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    .line 331
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTypeTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    invoke-static {}, Lcom/burstly/lib/component/networkcomponent/burstly/ImageCache;->getInstance()Lcom/burstly/lib/component/networkcomponent/burstly/ImageCache;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/burstly/lib/network/request/ImageFetchTask;->setCache(Lcom/burstly/lib/persistance/IResourse;)V

    .line 332
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTypeTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Lcom/burstly/lib/util/Utils;->getScale(Landroid/content/Context;)F

    move-result v1

    invoke-virtual {v0, v1}, Lcom/burstly/lib/network/request/ImageFetchTask;->setScale(F)V

    .line 333
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTypeTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    new-array v1, v4, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/burstly/lib/network/request/ImageFetchTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 335
    :cond_0
    return-void
.end method

.method private loadType()V
    .locals 2

    .prologue
    .line 414
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getResponseData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v1

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getDestType()Ljava/lang/Integer;

    move-result-object v0

    .line 415
    .local v0, destType:Ljava/lang/Integer;
    sget-object v1, Lcom/burstly/lib/network/beans/DestinationType;->DestinationType_rss:Lcom/burstly/lib/network/beans/DestinationType;

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/DestinationType;->getValue()Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 416
    const-string v1, "http://img.appads.com/icons/dest_rss.png"

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTypeIcon(Ljava/lang/String;)V

    .line 436
    :cond_0
    :goto_0
    return-void

    .line 417
    :cond_1
    sget-object v1, Lcom/burstly/lib/network/beans/DestinationType;->DestinationType_twitter:Lcom/burstly/lib/network/beans/DestinationType;

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/DestinationType;->getValue()Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 418
    const-string v1, "http://img.appads.com/icons/dest_twitter.png"

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTypeIcon(Ljava/lang/String;)V

    goto :goto_0

    .line 419
    :cond_2
    sget-object v1, Lcom/burstly/lib/network/beans/DestinationType;->DestinationType_webSite:Lcom/burstly/lib/network/beans/DestinationType;

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/DestinationType;->getValue()Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_3

    .line 420
    const-string v1, "http://img.appads.com/icons/dest_website.png"

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTypeIcon(Ljava/lang/String;)V

    goto :goto_0

    .line 421
    :cond_3
    sget-object v1, Lcom/burstly/lib/network/beans/DestinationType;->DestinationType_audio:Lcom/burstly/lib/network/beans/DestinationType;

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/DestinationType;->getValue()Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 422
    const-string v1, "http://img.appads.com/icons/dest_audio.png"

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTypeIcon(Ljava/lang/String;)V

    goto :goto_0

    .line 423
    :cond_4
    sget-object v1, Lcom/burstly/lib/network/beans/DestinationType;->DestinationType_video:Lcom/burstly/lib/network/beans/DestinationType;

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/DestinationType;->getValue()Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_5

    .line 424
    const-string v1, "http://img.appads.com/icons/dest_video.png"

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTypeIcon(Ljava/lang/String;)V

    goto :goto_0

    .line 425
    :cond_5
    sget-object v1, Lcom/burstly/lib/network/beans/DestinationType;->DestinationType_appStore:Lcom/burstly/lib/network/beans/DestinationType;

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/DestinationType;->getValue()Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_6

    .line 426
    const-string v1, "http://img.appads.com/icons/dest_appstore.png"

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTypeIcon(Ljava/lang/String;)V

    goto :goto_0

    .line 427
    :cond_6
    sget-object v1, Lcom/burstly/lib/network/beans/DestinationType;->DestinationType_call:Lcom/burstly/lib/network/beans/DestinationType;

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/DestinationType;->getValue()Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_7

    .line 428
    const-string v1, "http://img.appads.com/icons/dest_call.png"

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTypeIcon(Ljava/lang/String;)V

    goto :goto_0

    .line 429
    :cond_7
    sget-object v1, Lcom/burstly/lib/network/beans/DestinationType;->DestinationType_iTunes:Lcom/burstly/lib/network/beans/DestinationType;

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/DestinationType;->getValue()Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_8

    .line 430
    const-string v1, "http://img.appads.com/icons/dest_itunes.png"

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTypeIcon(Ljava/lang/String;)V

    goto :goto_0

    .line 431
    :cond_8
    sget-object v1, Lcom/burstly/lib/network/beans/DestinationType;->DestinationType_custom:Lcom/burstly/lib/network/beans/DestinationType;

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/DestinationType;->getValue()Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_9

    .line 432
    const-string v1, "http://img.appads.com/icons/dest_custom.png"

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTypeIcon(Ljava/lang/String;)V

    goto/16 :goto_0

    .line 433
    :cond_9
    sget-object v1, Lcom/burstly/lib/network/beans/DestinationType;->DestinationType_inAppPurchase:Lcom/burstly/lib/network/beans/DestinationType;

    invoke-virtual {v1}, Lcom/burstly/lib/network/beans/DestinationType;->getValue()Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/Integer;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 434
    const-string v1, "http://img.appads.com/icons/dest_inapp.png"

    invoke-direct {p0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTypeIcon(Ljava/lang/String;)V

    goto/16 :goto_0
.end method

.method private setInitValues()V
    .locals 1

    .prologue
    .line 368
    const/4 v0, 0x1

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLoadedComponentsCount:I

    .line 369
    const/4 v0, 0x0

    iput v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mComponentsToLoad:I

    .line 370
    return-void
.end method

.method private wrap(Landroid/view/View;)Landroid/view/ViewGroup;
    .locals 5
    .parameter "view"

    .prologue
    .line 404
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/ClickAwareWrapper;

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v2

    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getViewId()Ljava/lang/String;

    move-result-object v3

    const-string v4, "burstlyText"

    invoke-direct {v0, v1, v2, v3, v4}, Lcom/burstly/lib/component/networkcomponent/ClickAwareWrapper;-><init>(Landroid/content/Context;Lcom/burstly/lib/component/IBurstlyAdaptorListener;Ljava/lang/String;Ljava/lang/String;)V

    .line 406
    .local v0, clickAwareWrapper:Landroid/view/ViewGroup;
    invoke-virtual {v0, p1}, Landroid/view/ViewGroup;->addView(Landroid/view/View;)V

    .line 407
    return-object v0
.end method


# virtual methods
.method protected doGetNewAd()Landroid/view/View;
    .locals 5

    .prologue
    .line 374
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->setInitValues()V

    .line 375
    iget v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mComponentsToLoad:I

    add-int/lit8 v2, v2, 0x1

    iput v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mComponentsToLoad:I

    .line 376
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getContext()Landroid/content/Context;

    move-result-object v0

    .line 377
    .local v0, context:Landroid/content/Context;
    invoke-direct {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->createLayout(Landroid/content/Context;)V

    .line 378
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getResponseData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v2

    invoke-virtual {v2}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getImageUrl()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getTileIcon(Ljava/lang/String;)V

    .line 379
    invoke-direct {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->createTextField(Landroid/content/Context;)V

    .line 380
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getResponseData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v2

    invoke-virtual {v2}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getAdText()Ljava/lang/String;

    move-result-object v1

    .line 381
    .local v1, text:Ljava/lang/String;
    if-eqz v1, :cond_1

    const-string v2, "\r"

    const-string v3, ""

    invoke-virtual {v1, v2, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v2

    :goto_0
    iput-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mAdText:Ljava/lang/String;

    .line 382
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mAdText:Ljava/lang/String;

    invoke-virtual {p0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->setText(Ljava/lang/String;)V

    .line 383
    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->loadType()V

    .line 384
    iget v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mComponentsToLoad:I

    const/4 v3, 0x1

    if-ne v2, v3, :cond_0

    .line 386
    new-instance v2, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;

    const-wide/16 v3, 0x64

    invoke-direct {v2, v3, v4}, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;-><init>(J)V

    new-instance v3, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$1;

    invoke-direct {v3, p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor$1;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;)V

    invoke-virtual {v2, v3}, Lcom/burstly/lib/component/networkcomponent/DelayedCallbackExecutor;->execute(Ljava/lang/Runnable;)V

    .line 394
    :cond_0
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    invoke-direct {p0, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->wrap(Landroid/view/View;)Landroid/view/ViewGroup;

    move-result-object v2

    return-object v2

    .line 381
    :cond_1
    const-string v2, ""

    goto :goto_0
.end method

.method failed()V
    .locals 4

    .prologue
    .line 307
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->stop()V

    .line 308
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v0

    const-string v1, "burstlyText"

    const/4 v2, 0x0

    const-string v3, ""

    invoke-interface {v0, v1, v2, v3}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->failedToLoad(Ljava/lang/String;ZLjava/lang/String;)V

    .line 309
    return-void
.end method

.method public getAdType()Lcom/burstly/lib/component/IBurstlyAdaptor$BurstlyAdType;
    .locals 1

    .prologue
    .line 445
    sget-object v0, Lcom/burstly/lib/component/IBurstlyAdaptor$BurstlyAdType;->BANNER_AD_TYPE:Lcom/burstly/lib/component/IBurstlyAdaptor$BurstlyAdType;

    return-object v0
.end method

.method public getNetworkName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 450
    const-string v0, "burstlyText"

    return-object v0
.end method

.method notifyIfLoaded()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 358
    iget v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLoadedComponentsCount:I

    iget v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mComponentsToLoad:I

    if-ne v0, v1, :cond_0

    .line 359
    sget-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->LOG:Lcom/burstly/lib/util/LoggerExt;

    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTag:Ljava/lang/String;

    const-string v2, "Tracking show..."

    new-array v3, v4, [Ljava/lang/Object;

    invoke-virtual {v0, v1, v2, v3}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 360
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v0

    const-string v1, "burstlyText"

    invoke-interface {v0, v1, v4}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->didLoad(Ljava/lang/String;Z)V

    .line 362
    :cond_0
    return-void
.end method

.method public precacheAd()Landroid/view/View;
    .locals 1

    .prologue
    .line 440
    invoke-virtual {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->getNewAd()Landroid/view/View;

    move-result-object v0

    return-object v0
.end method

.method public setText(Ljava/lang/String;)V
    .locals 3
    .parameter "newText"

    .prologue
    .line 298
    invoke-static {}, Landroid/text/method/HideReturnsTransformationMethod;->getInstance()Landroid/text/method/HideReturnsTransformationMethod;

    move-result-object v1

    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v1, p1, v2}, Landroid/text/method/HideReturnsTransformationMethod;->getTransformation(Ljava/lang/CharSequence;Landroid/view/View;)Ljava/lang/CharSequence;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    .line 300
    .local v0, filtered:Ljava/lang/String;
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mText:Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;

    invoke-virtual {v1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/TextViewMultilineEllipse;->setText(Ljava/lang/String;)V

    .line 301
    return-void
.end method

.method public stop()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 313
    invoke-super {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/AbstractBurstlyAdaptor;->stop()V

    .line 314
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTileTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    invoke-static {v0}, Lcom/burstly/lib/util/Utils;->cancelTask(Landroid/os/AsyncTask;)V

    .line 315
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTypeTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    invoke-static {v0}, Lcom/burstly/lib/util/Utils;->cancelTask(Landroid/os/AsyncTask;)V

    .line 316
    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTileTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    .line 317
    iput-object v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyTextAdaptor;->mTypeTask:Lcom/burstly/lib/network/request/ImageFetchTask;

    .line 318
    return-void
.end method

.method public supports(Ljava/lang/String;)Z
    .locals 1
    .parameter "action"

    .prologue
    .line 455
    const/4 v0, 0x1

    return v0
.end method
